<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			if(Array.prototype.indexOf===undefined){
				Array.prototype.indexOf=function(key,starti){
					if(starti===undefined){
						starti=0;
					}
					for(var i=starti;i<this.length;i++){
						if(key==this[i]){
							return "下标为"+i;
						}
					}	
					return -1;
				}
			}
			
			var arr=[1,2,3,4,5,7,8,9,4,5,68,8,9,465,43,164,632,1654,684,6,1];
			console.log(arr.indexOf(164));
		</script>
	</body>
</html>
